package com.zbiti.anvil.webservice.gateway.samples.domain;

import com.zbiti.sdk.common.annotation.validation.Max;
import com.zbiti.sdk.common.annotation.validation.Min;
import com.zbiti.sdk.common.annotation.validation.NotEmpty;
import com.zbiti.sdk.common.annotation.validation.NotNull;
import com.zbiti.sdk.common.annotation.validation.Pattern;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlElement;

import java.util.List;
import java.util.Map;

/**
 * 演示参数
 *
 * @author Fanyc
 * @date 2022-01-18 15:51
 */
@XmlAccessorType(XmlAccessType.FIELD)
public class DemoParamDomain {

    @NotNull
    @Min("2")
    @XmlElement(name = "ID",required = true)
    private Long id;

    @NotNull
    @NotEmpty
    @Max("5")
    @Min("2")
    @Pattern("[a-z]*")
    @XmlElement(name = "NAME",required = true)
    private String name;

    @XmlElement(name = "AGE",required = true)
    private Integer age;

    @Max("5")
    @Min("2")
    @XmlElement(name = "ROLES")
    private List<String> roles;

    @Max("5")
    @Min("2")
    private Map<String,String> perms;

    private String notUser;

    public DemoParamDomain() {
    }

    //////////////////// Getter / Setter ////////////////////

    /**
     * 获取id
     *
     * @return 返回id
     */
    public Long getId() {
        return id;
    }

    /**
     * 设置id的值
     *
     * @param id 要设置的值
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 获取name
     *
     * @return 返回name
     */
    public String getName() {
        return name;
    }

    /**
     * 设置name的值
     *
     * @param name 要设置的值
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获取age
     *
     * @return 返回age
     */
    public Integer getAge() {
        return age;
    }

    /**
     * 设置age的值
     *
     * @param age 要设置的值
     */
    public void setAge(Integer age) {
        this.age = age;
    }

    /**
     * 获取roles
     *
     * @return 返回roles
     */
    public List<String> getRoles() {
        return roles;
    }

    /**
     * 设置roles的值
     *
     * @param roles 要设置的值
     */
    public void setRoles(List<String> roles) {
        this.roles = roles;
    }

    /**
     * 获取perms
     *
     * @return 返回perms
     */
    public Map<String, String> getPerms() {
        return perms;
    }

    /**
     * 设置perms的值
     *
     * @param perms 要设置的值
     */
    public void setPerms(Map<String, String> perms) {
        this.perms = perms;
    }

    /**
     * 获取notUser
     *
     * @return 返回notUser
     */
    public String getNotUser() {
        return notUser;
    }

    /**
     * 设置notUser的值
     *
     * @param notUser 要设置的值
     */
    public void setNotUser(String notUser) {
        this.notUser = notUser;
    }
}
